<?php

namespace app\backend\validator;

use think\Validate;

class ProfileValidator extends Validate
{
    protected $rule = [
        'origin_password' => 'require|alphaNum|min:6|max:12',
        'new_password' => 'require|alphaNum|min:6|max:12',
    ];

    protected $message = [
        'origin_password.require' => '原密码必填',
        'origin_password.min' => '原密码长度不能小于6个字符',
        'origin_password.max' => '原密码长度不能超过12个字符',
        'new_password.require' => '新密码必填',
        'new_password.min' => '新密码长度不能小于6个字符',
        'new_password.max' => '新密码长度不能超过12个字符',
    ];
}